package com.core.netty.http.work;

import com.core.netty.util.NettyUtil;
import io.netty.channel.ChannelFutureListener;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.http.*;

import java.io.UnsupportedEncodingException;

public abstract class HttpMySerlvet implements MySerlvet {
    private HttpMyRequest myreq;
    private HttpMyReponse myrep;

    @Override
    abstract public void domain(HttpMyRequest req, HttpMyReponse rep);

    public void domainBefor(HttpMyRequest req, HttpMyReponse rep) {
        setMyreq(req);
        setMyrep(rep);
    }

    public void domainAfter() {

    }


    @Override
    abstract public void init();

    @Override
    abstract public void destory();

    public HttpMyReponse getMyrep() {
        return myrep;
    }

    public void setMyrep(HttpMyReponse myrep) {
        this.myrep = myrep;
    }

    public HttpMyRequest getMyreq() {
        return myreq;
    }

    public void setMyreq(HttpMyRequest myreq) {
        this.myreq = myreq;
    }
}
